package com.aaa.dao;

import com.aaa.dto.GoodsLoginInfo;
import com.aaa.dto.UpdateCheckGoodsLogin;
import com.aaa.dto.UpdateGoodsInfo;
import com.aaa.pojo.Goods;
import com.aaa.pojo.GoodsType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface GoodsDao {

    List<Goods> findAllGoods();

    int addGoods(Goods goods);

    List<GoodsType> findAllType();

    int updateStateOfGoodsById(@Param("id") Integer id, @Param("state") Integer state);

    int updateCountOfGoodsById(@Param("id") Integer id, @Param("buyCount") Integer buyCount);

    int addGoodsLoginInfo(GoodsLoginInfo goodsLoginInfo);

    List<GoodsLoginInfo> findGoodsLoginInfo();

    int updateStatusById(UpdateCheckGoodsLogin updateCheckGoodsLogin);

    int updateCountByGoodsId(UpdateCheckGoodsLogin updateCheckGoodsLogin);

    int updateGoodsInfoByGoodsId(UpdateGoodsInfo updateGoodsInfo);
}
